package com.imonsoft.common.httpModel;

import com.imonsoft.common.util.StringUtil;

/**
 * JSON传输数据模型
 * 
 * @author LiQianHui
 * @date 2012-10-16
 * @version 2012
 */
public class ReturnMessage implements java.io.Serializable {

	private static final long serialVersionUID = -8445014037130200665L;
	private boolean success = false;// 是否成功
	private String msg = "";// 提示信息
	private Object obj = "";// 其他要传递的内容

	public String getMsg() {
		if (this.success && StringUtil.isBlank(this.msg)) {
			this.msg = "操作成功！";
		}
		if (!this.success && StringUtil.isBlank(this.msg)) {
			this.msg = "操作失败！";
		}
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getObj() {
		return obj;
	}

	public void setObj(Object obj) {
		this.obj = obj;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

}
